<jsp:directive.page contentType="text/html;charset=utf-8" />
<%@ include file="/taglibs.jsp" %>

<head>
	<meta name="decorator" content="singleColumn">

<title>iobike - forgot password</title>
</head>

<body>

<div class='small'>
	<h2>Don't worry, we all forget sometimes</h2>
	<p>Enter the e-mail you signed up with and we'll e-mail you a link to reset your password.</p>
	<form id="forgotPasswordform" action="${ctx}/user!forgotPassword.action" validate="true"  method="post">
	  <div class="control-group">
	    <label class="control-label" for="user_email"> Email Address</label>
	    <div class="controls">
	      <input class="string email required" id="user_email" maxlength="255" name="user.email" size="50" type="email" value="" />
	    </div>
	  </div> 
	  <div class="control-group">
	    <div class="controls">
	      <input name="commit" type="submit" class="btn btn-primary" value="Reset Password" />
	    </div>
	  </div>
	</form>
	<div class='clearfix'></div>
</div>


<script type="text/javascript">

$(document).ready(function() {
	
    // validate signup form on keyup and submit 
    var validator = $("#forgotPasswordform").validate({ 
        rules: { 
		    'user.email': {
		        remote:"${ctx}/user!checkExistence.action?checkedField=email"
		    }
        }, 
        messages: {
        	'user.email': {remote: jQuery.validator.format("<s:text name='error.emailNotExist'/>")}
        }, 
        onkeyup: false,
    });
    document.all.user_email.focus();
}); 
</script>
</body>
